local app = require "app"
local gamelib = require "club.threecard.gamelib"

local game = gamelib.game.new({
    package = "club.threecard.zjh",
    pokerlib = require "club.threecard.pokerlib",
    on_start = function(self)
        self.game_scene.overried_entrance(require "club.threecard.zjh.overried_entrance.entrances")
        self.kbe.register("ZJHPlayer")
        self.kbe.register("ZJHRoom")
        self.ui.init_routes()
    end,
    on_started = function(self)
        if gamelib.kbe.player().active_game == package then
            gamelib.game_scene.enter();
            return;
        end
        
        self.router.go("/"..package.."/main")
    end
})
return game